home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga CD-ROM Collection
/
Amiga CD-ROM Collection - Auge 4000 and Cactus and Demo Util.iso
/
cactus
/
09
/
microemacs
/
.emacsrc
next >
Wrap
Text File
|
1988-01-19
|
5KB
|
218 lines
; EMACS.RC: Startup file for MicroEMACS 3.8
;
; This file is executed everytime the
; editor is entered
set $discmd "FALSE"
write-message "[Setting up....]"
; If you screen "SNOWS", uncomment this line
; set $flicker "TRUE"
; If you are on an IBM-PC EGA card and want to force the
; screen to EGA mode, uncomment the following line
; set $sres "EGA"
; ***** Rebind the Function key group
bind-to-key search-forward FN0
bind-to-key search-reverse FN1
bind-to-key hunt-forward FN2
bind-to-key hunt-backward FN3
bind-to-key next-window FN4
bind-to-key execute-macro FN5
bind-to-key find-file FN6
bind-to-key execute-file FN7
bind-to-key save-file FN8
bind-to-key exit-emacs FN9
bind-to-key apropos FNR
bind-to-key describe-key FNS
bind-to-key fill-paragraph FNT
bind-to-key shell-command FNX
bind-to-key i-shell FNY
; set screen colors
add-global-mode "black"
; toggle function key window off
1 store-macro
save-window
1 next-window
!if &sequal "Function Keys" $cbufname
delete-window
!endif
bind-to-key execute-macro-14 FNP
!force restore-window
write-message "[Function key window OFF]"
!endm
; toggle function key window back on
14 store-macro
1 next-window
!if &sequal $cbufname "emacs.hlp"
execute-macro-11
!endif
!if ¬ &sequal $cbufname "Function Keys"
1 split-current-window
select-buffer "Function Keys"
add-mode "red"
!force 5 resize-window
beginning-of-file
!endif
bind-to-key execute-macro-1 FNP
2 next-window
write-message "[Function key window ON]"
!endm
; Enter Help
2 store-macro
1 next-window ;Make sure the function key window isn't up!
!if &sequal $cbufname "Function Keys"
delete-window
bind-to-key execute-macro-14 FNP
!endif
help
8 resize-window
bind-to-key execute-macro-12 FNT
bind-to-key execute-macro-13 FNS
bind-to-key execute-macro-11 FNQ
bind-to-key execute-macro-15 ^XO
bind-to-key execute-macro-15 ^XP
bind-to-key execute-macro-15 FN4
add-mode "red"
beginning-of-file
2 forward-character
clear-message-line
!endm
; Exit Help
11 store-macro
bind-to-key previous-page FNT
bind-to-key next-page FNS
bind-to-key execute-macro-2 FNQ
bind-to-key next-window ^XO
bind-to-key previous-window ^XP
bind-to-key next-window FN4
delete-window
clear-message-line
!endm
; don't allow these commands from within the HELP screen
15 store-macro
write-message "[Use F2 to exit HELP]"
!endm
; last help page
12 store-macro
beginning-of-line
search-reverse "=>"
1 redraw-display
!endm
; next help page
13 store-macro
beginning-of-line
2 forward-character
search-forward "=>"
1 redraw-display
!endm
; reformat indented paragraph
6 store-macro
write-message " [Fixing paragraph]"
set $discmd "FALSE"
kill-region
2 split-current-window
select-buffer "[temp]"
yank
beginning-of-file
replace-string "~n " "~n"
66 set-fill-column
fill-paragraph
77 set-fill-column
beginning-of-file
handle-tab
replace-string ~n "~n "
end-of-file
2 delete-previous-character
beginning-of-file
set-mark
end-of-file
kill-region
unmark-buffer
delete-window
yank
delete-buffer "[temp]"
set $discmd "TRUE"
write-message " [Fixed paragraph]"
!endm
; indent region
7 store-macro
write-message " [Indenting region]"
kill-region
2 split-current-window
select-buffer "[temp]"
yank
beginning-of-file
handle-tab
replace-string "~n" "~n "
end-of-file
4 delete-previous-character
beginning-of-file
set-mark
write-message " [Indenting region]"
end-of-file
kill-region
unmark-buffer
delete-window
yank
delete-buffer "[temp]"
write-message " [Region Indented]"
!endm
; undent region
8 store-macro
write-message " [Undenting region]"
kill-region
2 split-current-window
select-buffer "[temp]"
yank
beginning-of-file
delete-next-character
replace-string "~n " "~n"
end-of-file
2 delete-previous-character
beginning-of-file
set-mark
write-message " [Undenting region]"
end-of-file
kill-region
unmark-buffer
delete-window
yank
delete-buffer "[temp]"
write-message " [Region undented]"
!endm
; bring up the function key window
1 split-current-window
select-buffer "Function Keys"
add-mode "red"
5 resize-window
insert-string "f1 search f2 search back | F1 toggle function list F2 toggle help file~n"
insert-string "f3 hunt f4 hunt back | F3 find command/apropos F4 describe key~n"
insert-string "f5 next window f6 exec macro | F5 reformat paragraph F6 ref undented region~n"
insert-string "f7 find file f8 exec file | F7 indent region F8 undent region~n"
insert-string "f9 save file f10 exit emacs | F9 execute DOS command F10 shell up~n"
beginning-of-file
unmark-buffer
next-window
set $discmd "TRUE"
write-message "[Emacs is READY]"